//
//  GMDownloader.h
//  gentleman
//
//  Created by 范月成 on 2017/12/20.
//  Copyright © 2017年 fancy. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "GMArtwork.h"
#import "GMGallery.h"

typedef void(^downloaderProgressBlock)(NSInteger receivedCount, NSInteger expectedCount);
typedef void (^downloaderCompletedBlock)(NSError *error, NSInteger receivedCount, NSInteger expectedCount);

@interface GMDownloader : NSObject

/** Creates and returns a new `GMDownloader` object. */
+ (instancetype)downloader;

/** Returns the default shared `GMDownloader` singleton object. */
+ (instancetype)defaultDownloader;

@property (nonatomic, strong, readonly) GMArtwork *artwork;

- (void)downloadArtworksWithArtwork:(GMArtwork *)artwork
                            gallery:(GMGallery *)gallery
                           progress:(downloaderProgressBlock)progress
                          completed:(downloaderCompletedBlock)completed;
  
 

@end
